:root{
    --app-height: 100vh;
}
html{
    background: #3f80b6;
    color: #FFF;
    overflow: hidden;
    font: 16px sans-serif;

    &[data-device="iphone"],
    &[data-device="ipad"],
    &[data-device="ipod"],
    &[data-device="ios"] {
        --app-height: -webkit-fill-available;
    }

    &[data-alpha="true"]{
        background: none;
        footer,
        .ctrl-box{
            display: none;
        }
    }

    &[data-is-super-vertical="true"]{
        body{
            box-sizing: border-box;
            padding-bottom: 60px;
            // height: calc(var(--app-height) - 60px);
        }
    }
}

body{
    margin: 0;
    overflow: hidden;
    // position: fixed;
    position: relative;
    width: 100vw;
    height: 100vh;
    height: var(--app-height);
}
a{
    color: #a4c5e1;
    text-decoration: none;
    cursor: pointer;
}
.app{
    display: block;
    height:100%;
}
canvas{
    position: absolute;
    // box-shadow:0 0 0 2px blue;
    // top:0;
    left:0;
    right:0;
    bottom:0;
    margin:0 auto;
    // width: 100vw;
}
.single-box{
    margin:140px auto 0;
    width: 200px;
    height: 500px;
    // box-shadow:0 0 0 2px blue;
    position: relative;

    position: absolute;
    bottom:0;
    left:0;
    right:0;

    .main{
        // width: 140px;
        // height: 200px;
        // opacity: 0.5;

        --main-width: 300px;
        --main-height: 300px;
        width: var(--main-width);
        height: var(--main-height);

        position: absolute;
        left: calc( 200px / 2 - var(--main-width) / 2 );
        // top: calc( 240px - var(--main-height) );
        bottom: 260px;
        // box-shadow:0 0 0 2px red;

        cursor: pointer;
        transform-origin: 50% 400px;
        background: no-repeat 50% 50%;
        background-size:cover;
        background-image: url(sakana.png);
        // background-image: url(FYlpb3dacAAhuxs.jpg);
        &.chisato{
            background-image: url(chisato.png);
        }
    }
    .bed{
        width: 160px;
        height: 20px;
        position: absolute;
        left: 20px;
        bottom: 0;
        // box-shadow:0 0 0 2px green;
        background: rgba(255,255,255,.5) no-repeat 50% 50%;
        border-radius: 2px;
        cursor: pointer;
        background-image: url(blue00f4.png);
        background-size: 20px 20px;
    }
}


.ctrl-box{
    position: absolute;
    bottom:0;
    left:0;
    font-size: 12px;
    line-height: 20px;
    padding: 4px 4px;
    overflow: hidden;
    width: 50px;
    a{
        float: left;
        padding:0 4px;
        margin-top:2px;
        border-radius:2px;
        &[data-active="true"]{
            background: #182562;
        }
    }
}
.trigger-magic-link{
    &:before{
        content: '自动';
    }
}


footer{
    position: absolute;
    bottom:0;
    right:0;
    font-size: 12px;
    line-height: 20px;
    padding: 4px 8px;
    text-align: right;
    
    a{
        display: block;
        span{
            opacity: 0.5;
        }
    }
}
button{
    border:0;
    background:#000;
    color:#FFF;
    font:inherit;
    line-height: 1.4;
    padding:15px 20px;
    border-radius:4px; 
    cursor: pointer;
}

.set-voice {
    cursor: pointer;

    &.voice-mute {
        text-decoration: line-through;
        // &::before, &::after {
        //     content: '\00a0';
        // }
    }
}

.set-orientation-link{
    display: none;
}
[data-text]{
    &:before{
        content: attr(data-text);
    }
}

html[data-can-orientation="true"]{
    .set-orientation-link{
        display: block;
    }
}
html[data-permission-state="true"]{
    .set-orientation-link{
        display: none;
    }
}

